<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>list</title>
<style>
body{
	margin-left:0px;
	}
* td{
		word-break:break-all;}
</style>
<?
require_once '../inc.php';
$_REQUEST['find']=str_replace(
array("{t}tech{-t}"),

array("教程"),


$_REQUEST['find']);
function _list_echo_find_regexp($str){
    return str_replace(
	array("教程"),
	array("{t}tech{-t}"),
	$str
	);	
	
}

//初使化改变REQUEST的值
//$_REQUEST['find']=urlencode($_REQUEST['find']);
Clarray::init();

?>
<script src="jquery-2.0.3.js"></script>
<script>
window.onerror = function(errorMessage, scriptURL, lineNumber) {

 // alert(errorMessage, scriptURL, lineNumber)
    alert( "ERROR Message:  "+errorMessage)
    alert( "ERR scriptURL:  "+scriptURL)
    alert ("ERRlineNumber:  "+lineNumber)
}

try{
$().ready(function(){
        $(window).keydown(function(event){
			if(event.keyCode==13
			)
				{
				  
				 $c=$("#idframset",parent.document);
					if(window._full!=true){
					parent.document.documentElement.webkitRequestFullScreen.call(
					parent.document.documentElement);
					window._full=true;
					$c.each(function(){
						   
							 this.cols="30,*";	 		
					 })
					 
			 
					}else{
					$c.each(function(){
							 this.cols="500,*";							
					 }) 
				   parent.document.webkitExitFullscreen(
				   parent.document);
				   window._full=false;			
				  }
					
				}
	
			//alert(event.keyCode);
	        if(event.keyCode==221 || event.keyCode ==13)
			{
			 $('.num').toggle();
			}
			 $c=$("#idframset",parent.document);
			 //.contents().find('frameset'));
			 if(event.keyCode ==45)
			{
			 document.bgColor ="#000";
              $c.each(function(){
			    this.cols="30,*";
				})
			}
	       if(event.keyCode ==46)
			{
                 $c.each(function(){
				     this.cols="500,*";
				 })
			}
			if(event.keyCode==219)
			{
				
			 document.bgColor=document.bgColor=="#000"?"#fff":"#000";
			}
	     
	    })
		
		$("#idmain_ctrl").click(function(){
			//alert($('#main_location').html());
		 window.open($('#main_location').val(),"main_frame");	
		})
		$("#idmain_ctrln").click(function(){
			 //alert("GO:"+window.parent.frames["main_frame"].location)
			// window.parent.frames["main_frame"].location.reload()
			 cont=window.parent.frames["main_frame"]
			 var i=0
			 for(p in cont){
				 i++
				 
			    //i<100?alert(p):true;	 
			}
			 
		})
		
		
		$("#idfull").click(function(){
		
					$c=$("#idframset",parent.document);
					$c.each(function(){
						    if( this.cols!="500,*"){
							 this.cols="500,*";
							 }else{
							 this.cols="30,*";	 
							}
					 })
	
			
		});
		
		$('input:radio').each(function(){
		 
		   if(this.value=="<? echo $_REQUEST["open"];?>"){
			 
			this.checked=true;   
		   } 
		    
		}).delay(1000)
})
}catch(e){
alert(e.description)	
}
function _gox_(href){
	 try{
	$open=$('input:radio:checked').val() ;
	
	}catch(e){
		alert(e.description);
		} 
	// _href=(href).replace(/(open)(\=)/g,"\n{$$}\n");
	_href=(href).replace(/^([0-9a-zA-Z\-\._]+)[\?]{1}/g,$open+"?");
	_href=(_href).replace(/(open)(\=)([0-9a-zA-Z\-\._]{0,})/g,"open="+$open  );
	
	_try(function (_href){$('#main_location').val(_href);},_href);
	 window.open(_href,"main_frame");
	 
	return void(0);
}
function _try(fn,argu){
	try{
    fn(argu);	
	}catch(e){}	
} 
function _go2_(_href){
	$open=$('input:radio:checked').val() ;
	 _tag_($('#idRegExp').val())
	$find= "&find="+$('#idRegExp').val()  ;
	 
	
	$page="&page="+<? echo($_REQUEST["page"]+1) ?>+"&";
	_href=(_href).replace(/(open)(\=)([0-9a-zA-Z\-\._]{0,})/g,"open="+$open+$find+$page);
	window.open(_href,"_self");
	
}
 
function _golinks_(_href){
	$open=$('input:radio:checked').val() ;
	$find="&find="+$('#idRegExp').val();
	$page="&page="+<? echo($_REQUEST["page"]+1) ?>+"&";
	_href=(_href).replace(/(open)(\=)([0-9a-zA-Z\-\._]{0,})/g,"open=links.php&"+$find+$page);

	window.open(_href,"_self");
	
	
}
function _tag_($tag){
	/*
	$tag=$tag.replace(/\/\(([\d\D]*)\)\/(i?)(s?)/g
	,("$1")+"____$2$3"
	)
	$tag=$tag.split("____") 
	$tag="/("+escape($tag[0])+")/"+$tag[1]
	$tag=$tag.replace(/undefined/,"")
	//alert($tag);
	*/
	$('#idRegExp').val($tag);
	}


</script>
</head>

<body>
<? 
//secho (_get_query_string($_SERVER['HTTP_REFERER'],'dir'));
?>
<input id="idfull" name="" type="button"  value="F" style="margin-left:0px;"></br>
<input id="idmain_ctrl" name="" type="button"  value="R" style="margin-left:0px;"></br>
<input id="idmain_ctrln" name="" type="button"  value="N" style="margin-left:0px; display:none">
 <div style="margin-left:30px; width:450px; overflow-x:hidden;">
 <div  ></div>
<textarea name="" cols="" rows="" id="main_location"  value=""  style="width:440px; overflow::hidden; word-break:break-all;"></textarea>
<?
 echo "<b>find:{".$_REQUEST["find"]."}</b></br>";
echo "<b>_dir:{".$_REQUEST["dir"]."}</b></br>";
 echo "<b> open:{".$_REQUEST["open"]."}</b></br>";

 ?>
Insert/Delete为功能键<br>
<a href="javascript:_tag_('/({t}tech{-t})/s')">#教程</a>&nbsp;
<a href="javascript:_tag_('/(教)/s')">#教</a>&nbsp;
<a href="javascript:_tag_('/(jquery)/is')">#jquery</a>&nbsp;
<a href="javascript:_tag_('/(cpp)/is')">#cpp</a>&nbsp;
<a href="javascript:_tag_('')">清空</a>&nbsp;
<a href="javascript:_tag_('/()/s')">清空2</a>&nbsp;
<a href="javascript:_tag_('/(js)/is')">#js</a>&nbsp;
<a href="javascript:_tag_('/(php)/is')">#php</a>&nbsp;
<a href="javascript:_tag_('/(txt)/is')">#txt</a>&nbsp;
</br>
<a href="javascript:_tag_('/(a)/is')">#a</a>&nbsp;
<a href="javascript:_tag_('/([\\d]+)/is')">#[\d]+</a>&nbsp;
</br>
<input id="idRegExp" style="font-size:20px;color:#de0022; font-weight:bold;" name="" type="text" value="<? 
if($_REQUEST['find'])
{
	echo _list_echo_find_regexp($_REQUEST['find']);
}else{
	echo '';
	}
?>" size="20">
<form name="form1" method="post" action="">
    <label>
      <input type="radio" name="RadioGroup1" value="code.php" id="RadioGroup1_0" >
      code</label>
    <label>
      <input type="radio" name="RadioGroup1" value="toKorean.php" id="RadioGroup1_1" >
      korean</label>
       <label>
      <input type="radio" name="RadioGroup1" value="show.php" id="RadioGroup1_1" >
      show</label>
       <label>
       <input type="radio" name="RadioGroup1" value="code_for_write.php" id="RadioGroup1_1" >
       code_only_read</label><br>
         <label>
       <input type="radio" name="RadioGroup1" value="links.php" id="RadioGroup1_1" >
       links</label>
       
        <input type="radio" name="RadioGroup1" value="function_sort.php" id="RadioGroup1_1" >
      function_sort.php</label>
         <input type="radio" name="RadioGroup1" value="get_html.php" id="RadioGroup1_1" >
       get_html.php</label><br>
            <input type="radio" name="RadioGroup1" value="src.php"   >
       src.php</label>
     
     
</form>
<input name="" type="button" onClick="_go2_('?open=code.php&dir=I:/_phplib')" value="I:/_phplib">
<input name="" type="button" onClick="_go2_('?open=code.php&dir=I:/code')" value="I:/code">
<input name="" type="button" onClick="_golinks_('?open=links.php&dir=I:/_I_archives/_web')" value="I:/_I_archives/_web">

<?

chdir($_REQUEST["dir"]);
$clarray=new Clarray();
$clarray->MkDirLinks();//输出目录链接
$clarray->SetFileLinks();
$clarray->MkFilelinksAndPageLinks();//输出文件链接和分页代码
//secho(Clarray::GetMethods());    //取得class name 类的所有的方法名，并且组成一个数组 
//secho($clarray->GetVars()); 

?>
 </div>
</body>
</html>